home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / UTILITY / DO1002.ARJ / TIMER.SCR < prev    next >
Text File  |  1991-12-05  |  1KB  |  44 lines

  1. *┌─────────────────────────────────────────────────────────┐
  2. *│ SCRIPT: Timer -- shows use of /CLOCK and /LOOK commands │
  3. *└─────────────────────────────────────────────────────────┘
  4. /CLOCK ON
  5. .clr
  6.    TIMER:
  7.   ╔══════════════════════════════════════════════════════════════╗
  8.   ║ This script will record the amount of time you spend in      ║
  9.   ║ interactive mode.  Press »bo«<ENTER>»#« to go into interactive      ║
  10.   ║ mode.  Be sure to use the »ye«/EXIT»#« command to leave interactive ║
  11.   ║ mode.                                                        ║
  12.   ╚══════════════════════════════════════════════════════════════╝
  13.  
  14. /PAGEPROMPT "Press <enter> to go into interactive mode . . ."
  15.  
  16. .pg
  17. * Check the default clock position for the value
  18. /LOOK 1 70 8
  19. * Store the value in the variable TimeOn
  20. /SET TimeOn %Found
  21.    Session Start: %TimeOn
  22. * Go into interactive mode
  23. /RETRIEVE OFF
  24. /INTERACTIVE
  25. /PAGEPROMPT
  26. * After leaving interactive mode, check the time
  27. /LOOK 1 70 8
  28. * Store the value in TimeOff and display the result.
  29. /SET TimeOff %Found
  30. /CLOCK OFF
  31. /MATH SS (@cpy(%TimeOn,1,2)*3600)+(@cpy(%TimeOn,4,2)*60)+@cpy(%TimeOn,7,2)
  32. /MATH OS (@cpy(%TimeOff,1,2)*3600)+(@cpy(%TimeOff,4,2)*60)+@cpy(%TimeOff,7,2)
  33. /MATH Time %OS-%SS
  34. .clr
  35.  
  36.  »bo« INTERACTIVE SESSION TIMING »#«
  37.  
  38.    Session Start : %TimeOn
  39.    Session End   : %TimeOff
  40.    Seconds       : %Time(########)
  41.  
  42. /PAGE -24
  43. /ENDEXEC CLEAR
  44.